﻿@model RiderShop.Mobile.Modle.Home.IndexViewModel
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <title>蓉记·荔夏有礼</title>
    <link rel="stylesheet" href="~/Themes/RongJi/Style/summer/dist/css/summer.css">
</head>

<body>
    <div class="wrapper">
        <span class="redline"></span>
        <div class="toolbar">
            <a href="javascript:window.history.go(-1)" class="goback">返回</a>
            <a href="http://m.rongji365.com/" class="gohome">首页</a>
            <h1 id="toolbarTitle">夏</h1>
            <div class="hot">蓉记·荔夏有礼<em><span class="hotIcon">HOT</span></em></div>
        </div>
        <div class="pages">
            <ul class="homeList">
                @if (@Model.Banner != null && @Model.Banner.SummerImages != null)
                {
                    foreach (var item in @Model.Banner.SummerImages)
                    {
                        <li>
                            <a href="@item.NavigateUrl">
                                <img src="@item.ActualImageUrl" alt="">
                            </a>
                        </li>
                    }
                }
@*  <li><a href="poster-fruits.html"><img src="~/Themes/RongJi/Style/summer/assets/img/summer_fruits.jpg" alt=""></a></li>
            <li><a href="poster-eggs.html"><img src="~/Themes/RongJi/Style/summer/assets/img/summer_eggs.jpg" alt=""></a></li>
            <li><a href="poster-rice.html"><img src="~/Themes/RongJi/Style/summer/assets/img/summer_rice.jpg" alt=""></a></li>*@
            </ul>
        </div>
    </div>

    <script src="~/Themes/RongJi/Style/summer/dist/js/zepto.min.js"></script>
    <script>
        $('.redline').css({
            top: $('.toolbar').height() - 3,
            left: $('.goback').width(),
            width: $('#toolbarTitle').width() - 1
        });
        $('.homeList').css({
            paddingTop: $('.toolbar').height() + 10
        });

        $('.hot').css({
            margin: '0 36px'
        });

    </script>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript">

        window.config = {
            link: 'http://m.rongji365.com/Product/SummerAdv',
            imgUrl: 'http://m.rongji365.com/staticResource/summer/dist/img/logo.jpg',
            img_url: 'http://m.rongji365.com/staticResource/summe//dist/img/logo.jpg',
            title: '蓉记鲜鲜鲜-荔夏 鲜享季开启',
            desc: '立夏优选，蓉记鲜鲜鲜，GO有礼',
        };
        window.timelineconfig = {
            link: 'http://m.rongji365.com/Product/SummerAdv',
            imgUrl: 'http://m.rongji365.com/staticResource/summer/dist/img/logo.jpg',
            img_url: 'http://m.rongji365.com/staticResource/summer/dist/img/logo.jpg',
            title: '蓉记鲜鲜鲜-荔夏 鲜享季开启，立夏优选，蓉记鲜鲜鲜，GO有礼',
        };
        function onBridgeReady() {
            WeixinJSBridge.call('showOptionMenu');
        }

        if (typeof WeixinJSBridge == "undefined") {
            if (document.addEventListener) {
                document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
            } else if (document.attachEvent) {
                document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
                document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
            }
        } else {
            onBridgeReady();
        }

        document.addEventListener('WeixinJSBridgeReady', function () {
            var WJ = WeixinJSBridge;

            WJ.on('menu:share:appmessage', function () {
                WJ.invoke('sendAppMessage', config, function (res) {
                    // _report('sendAppMessage', res.err_msg);
                });
            });

            WJ.on('menu:share:timeline', function () {
                config.title = config.title + config.desc;
                WJ.invoke('shareTimeline', config, function (res) {
                    // _report('shareTimeline', res.err_msg);
                });
            });


            WJ.on('menu:share:weibo', function () {
                WJ.invoke('shareWeibo', config, function (res) {
                    // _report('shareWeibo', res.err_msg);
                });
            });
        });

        $(function () {
            var postData = {
                "currentUrl": location.href.split('#')[0]
            }
            $.post("/WeixinJsSdk/ConfigScriptJson", postData, function (wxConfig) {
                wxConfig = JSON.parse(wxConfig);
                //wxConfig.debug = true;
                wxConfig.jsApiList.push("showOptionMenu");
                wx.config(wxConfig);

                wx.ready(function () {

                    var config = window.config;
                    wx.onMenuShareAppMessage(config);
                    wx.onMenuShareTimeline(window.timelineconfig);
                    wx.onMenuShareQQ(config);
                    wx.onMenuShareWeibo(config);

                    wx.showOptionMenu();
                });

                wx.error(function (res) {

                });
            });
        });
    </script>
    <!--Static Code Start-->
    <img src="http://img.tongji.linezing.com/3547905/tongji.gif" style="display: none;">
    <script type="text/javascript">
        var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
        document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fd2c430d3acdc174f29f6feef73ea35fa' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <!-- Piwik -->
    <script type="text/javascript">
        var _paq = _paq || [];
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function () {
            var u = "//analytics.it-hsmedia.com/";
            _paq.push(['setTrackerUrl', u + 'piwik.php']);
            _paq.push(['setSiteId', 2]);
            var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
            g.type = 'text/javascript'; g.async = true; g.defer = true; g.src = u + 'piwik.js'; s.parentNode.insertBefore(g, s);
        })();
    </script>
    <noscript>
        <p>
            <img src="//analytics.it-hsmedia.com/piwik.php?idsite=2" style="border: 0;" alt="" />
        </p>
    </noscript>
    <!-- End Piwik Code -->
    <!--Static Code End-->
</body>
</html>
